//组件交互
    // f    命名函数:组件的函数可以通过该命名进行访问
    // r   接收函数:组件需要接收的函数,以'全局变量.xxx'字符串的方式设置
//语言设置
    // l    语言设置:组件输入语言中文 后台会根据中文翻译成多语言
//路由设置
    // u    路由设置:路由会根据用户id和项目id进行转换





//组件交互-命名函数
Vue.component('new_params_f_', {  
            template: `
<div>

<el-tooltip class="item" effect="dark" content="命名函数:通过 全局名称.命名函数 访问函数" placement="top">
<span class="new_params_base_from_span"style="color:#89fee9">
f</span>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="load_base_info.备注" placement="top">
<span class="new_params_base_from_span">
{{load_key}}</span>

</el-tooltip>

<div class="el-select new_params_base_from_float_right">

        <input class="new_params_input" v-model="v">
</input></div>
</div>
        `, 
        props:{value:null,load_params:null,load_base_info:null,load_key:null},
        data(){return {v:''}},
        methods:{
        update:function(e){
            this.$emit('input', e);
            let data_type="postput";//修改类型 postput是修改 delete是删除 clear是清空
            let data_value=e;//修改/新增/删除/清空的数据
            objs={
                'type':"change_data",
                "path":this.load_params.edit_path_before+(this.load_params.path?"."+this.load_params.path:""),
                "data_type":data_type,
                "data":data_value,
                other_callback:[
                    {
                      'key':'change_params',
                      data:{
                        'type':"change_data",
                        'path':this.load_params.path,//当前组件 修改的数据的路径
                        'idx':this.load_params.idx,//web窗口的dom的idx
                        'page':this.load_params.page,//web窗口当前正在操作的页面
                        "data_type":data_type,//修改类型 postput是修改 delete是删除 clear是清空
                        "data":data_value,
                    }
                    }]
            }
            try{lhp_run_func(this.load_params.update,objs);}
            catch{}
            
            }
        },
        watch:{'v':function(e){try{if(this.____init){this.____init=false;return}}catch{}this.update(e);}},
        mounted:function(){if(this.value){this.____init=true;this.v=this.value;}}
    });

//组件交互-接收函数
Vue.component('new_params_r_', {  
    template: `
<div>

<el-tooltip class="item" effect="dark" content="接收函数:组件需要接收的函数,以'全局变量.xxx'字符串的方式设置" placement="top">
<span class="new_params_base_from_span"style="color:#89fee9">
r</span>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="load_base_info.备注" placement="top">
<span class="new_params_base_from_span">
{{load_key}}</span>

</el-tooltip>

<div class="el-select new_params_base_from_float_right">

<input class="new_params_input" v-model="v">
</input></div>
</div>
`, 
props:{value:null,load_params:null,load_base_info:null,load_key:null},
data(){return {v:''}},
methods:{
update:function(e){
    this.$emit('input', e);
    let data_type="postput";//修改类型 postput是修改 delete是删除 clear是清空
    let data_value=e;//修改/新增/删除/清空的数据
    objs={
        'type':"change_data",
        "path":this.load_params.edit_path_before+(this.load_params.path?"."+this.load_params.path:""),
        "data_type":data_type,
        "data":data_value,
        other_callback:[
            {
              'key':'change_params',
              data:{
                'type':"change_data",
                'path':this.load_params.path,//当前组件 修改的数据的路径
                'idx':this.load_params.idx,//web窗口的dom的idx
                'page':this.load_params.page,//web窗口当前正在操作的页面
                "data_type":data_type,//修改类型 postput是修改 delete是删除 clear是清空
                "data":data_value,
            }
            }]
    }
    try{lhp_run_func(this.load_params.update,objs);}
    catch{}
    }
},
watch:{'v':function(e){try{if(this.____init){this.____init=false;return}}catch{}this.update(e);}},
mounted:function(){if(this.value){this.____init=true;this.v=this.value;}}
});

//组件交互-语言设置
Vue.component('new_params_l_', {  
    template: `
<div>

<el-tooltip class="item" effect="dark" content="语言设置:组件输入语言中文 后台会根据中文翻译成多语言" placement="top">
<span class="new_params_base_from_span"style="color:#89fee9">
l</span>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="load_base_info.备注" placement="top">
<span class="new_params_base_from_span">
{{load_key}}</span>

</el-tooltip>

<div class="el-select new_params_base_from_float_right">

<input class="new_params_input" v-model="v">
</input></div>
</div>
`, 
props:{value:null,load_params:null,load_base_info:null,load_key:null},
data(){return {v:''}},
methods:{
update:function(e){
    this.$emit('input', e);
    let data_type="postput";//修改类型 postput是修改 delete是删除 clear是清空
    let data_value=e;//修改/新增/删除/清空的数据
    objs={
        'type':"change_data",
        "path":this.load_params.edit_path_before+(this.load_params.path?"."+this.load_params.path:""),
        "data_type":data_type,
        "data":data_value,
        other_callback:[
            {
              'key':'change_params',
              data:{
                'type':"change_data",
                'path':this.load_params.path,//当前组件 修改的数据的路径
                'idx':this.load_params.idx,//web窗口的dom的idx
                'page':this.load_params.page,//web窗口当前正在操作的页面
                "data_type":data_type,//修改类型 postput是修改 delete是删除 clear是清空
                "data":data_value,
            }
            }]
    }
    try{lhp_run_func(this.load_params.update,objs);}
    catch{}
    }
},
watch:{'v':function(e){try{if(this.____init){this.____init=false;return}}catch{}this.update(e);}},
mounted:function(){if(this.value){this.____init=true;this.v=this.value;}}
});


//组件交互-语言设置
Vue.component('new_params_u_', {  
    template: `
<div>

<el-tooltip class="item" effect="dark" content="路由设置:路由会根据用户id和项目id进行转换" placement="top">
<span class="new_params_base_from_span"style="color:#89fee9">
u</span>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="load_base_info.备注" placement="top">
<span class="new_params_base_from_span">
{{load_key}}</span>

</el-tooltip>

<div class="el-select new_params_base_from_float_right">

<input class="new_params_input" v-model="v">
</input></div>
</div>
`, 
props:{value:null,load_params:null,load_base_info:null,load_key:null},
data(){return {v:''}},
methods:{
update:function(e){
    this.$emit('input', e);
    let data_type="postput";//修改类型 postput是修改 delete是删除 clear是清空
    let data_value=e;//修改/新增/删除/清空的数据
    objs={
        'type':"change_data",
        "path":this.load_params.edit_path_before+(this.load_params.path?"."+this.load_params.path:""),
        "data_type":data_type,
        "data":data_value,
        other_callback:[
            {
              'key':'change_params',
              data:{
                'type':"change_data",
                'path':this.load_params.path,//当前组件 修改的数据的路径
                'idx':this.load_params.idx,//web窗口的dom的idx
                'page':this.load_params.page,//web窗口当前正在操作的页面
                "data_type":data_type,//修改类型 postput是修改 delete是删除 clear是清空
                "data":data_value,
            }
            }]
    }
    try{lhp_run_func(this.load_params.update,objs);}
    catch{}
    }
},
watch:{'v':function(e){try{if(this.____init){this.____init=false;return}}catch{}this.update(e);}},
mounted:function(){if(this.value){this.____init=true;this.v=this.value;}}
});

//组件交互-命名数据
Vue.component('new_params_v_', {  
    template: `
<div>

<el-tooltip class="item" effect="dark" content="命名数据:通过 全局名称.命名数据 访问数据" placement="top">
<span class="new_params_base_from_span"style="color:#89fee9">
v</span>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="load_base_info.备注" placement="top">
<span class="new_params_base_from_span">
{{load_key}}</span>

</el-tooltip>

<div class="el-select new_params_base_from_float_right">

<input class="new_params_input" v-model="v">
</input></div>
</div> 
`, 
props:{value:null,load_params:null,load_base_info:null,load_key:null},
data(){return {v:''}},
methods:{
update:function(e){
    this.$emit('input', e);
    let data_type="postput";//修改类型 postput是修改 delete是删除 clear是清空
    let data_value=e;//修改/新增/删除/清空的数据
    objs={
        'type':"change_data",
        "path":this.load_params.edit_path_before+(this.load_params.path?"."+this.load_params.path:""),
        "data_type":data_type,
        "data":data_value,
        other_callback:[
            {
              'key':'change_params',
              data:{
                'type':"change_data",
                'path':this.load_params.path,//当前组件 修改的数据的路径
                'idx':this.load_params.idx,//web窗口的dom的idx
                'page':this.load_params.page,//web窗口当前正在操作的页面
                "data_type":data_type,//修改类型 postput是修改 delete是删除 clear是清空
                "data":data_value,
            }
            }]
    }
    try{lhp_run_func(this.load_params.update,objs);}
    catch{}
    }
},
watch:{'v':function(e){try{if(this.____init){this.____init=false;return}}catch{}this.update(e);}},
mounted:function(){if(this.value){this.____init=true;this.v=this.value;}}
});
//设置名称
Vue.component('new_params_var_name_', {  
    template: `
<div style="
align-items: center;
height: 48px;
line-height: 48px;
display: flex;
">

<el-tooltip class="item" effect="dark" content="将当前vue组件的this.data绑定为window[全局名称]" placement="top">
<span class="new_params_base_from_span">
{{load_key}}</span>

</el-tooltip>

<div class="el-select new_params_base_from_float_right"style="
margin-left: auto;">

<input class="new_params_input" v-model="v">
</input></div>
</div>
`, 
props:{value:null,load_params:null,load_base_info:null,load_key:null},
data(){return {v:''}},
methods:{
update:function(e){
    this.$emit('input', e);
    let data_type="postput";//修改类型 postput是修改 delete是删除 clear是清空
    let data_value=e;//修改/新增/删除/清空的数据
    objs={
        'type':"change_data",
        "path":this.load_params.edit_path_before+(this.load_params.path?"."+this.load_params.path:""),
        "data_type":data_type,
        "data":data_value,
        other_callback:[
            {
              'key':'change_params',
              data:{
                'type':"change_data",
                'path':this.load_params.path,//当前组件 修改的数据的路径
                'idx':this.load_params.idx,//web窗口的dom的idx
                'page':this.load_params.page,//web窗口当前正在操作的页面
                "data_type":data_type,//修改类型 postput是修改 delete是删除 clear是清空
                "data":data_value,
            }
            }]
    }
    try{lhp_run_func(this.load_params.update,objs);}
    catch{}
    }
},
watch:{'v':function(e){try{if(this.____init){this.____init=false;return}}catch{}this.update(e);}},
mounted:function(){if(this.value){this.____init=true;this.v=this.value;}}
});

//设置text
Vue.component('new_params_text_', {  
    template: `
<div style="
align-items: center;
height: 48px;
line-height: 48px;
display: flex;
">

<el-tooltip class="item" effect="dark" :content="load_base_info.备注" placement="top">
<span class="new_params_base_from_span">
{{load_key}}</span>

</el-tooltip>

<div class="el-select new_params_base_from_float_right"style="
margin-left: auto;">

<input class="new_params_input" v-model="v">
</input></div>
</div>
`, 
props:{value:null,load_params:null,load_base_info:null,load_key:null},
data(){return {v:''}},
methods:{
update:function(e){
    this.$emit('input', e);
    let data_type="postput";//修改类型 postput是修改 delete是删除 clear是清空
    let data_value=e;//修改/新增/删除/清空的数据
    objs={
        'type':"change_data",
        "path":this.load_params.edit_path_before+(this.load_params.path?"."+this.load_params.path:""),
        "data_type":data_type,
        "data":data_value,
        other_callback:[
            {
              'key':'change_params',
              data:{
                'type':"change_data",
                'path':this.load_params.path,//当前组件 修改的数据的路径
                'idx':this.load_params.idx,//web窗口的dom的idx
                'page':this.load_params.page,//web窗口当前正在操作的页面
                "data_type":data_type,//修改类型 postput是修改 delete是删除 clear是清空
                "data":data_value,
            }
            }]
    }
    try{lhp_run_func(this.load_params.update,objs);}
    catch{}
    }
},
watch:{'v':function(e){try{if(this.____init){this.____init=false;return}}catch{}this.update(e);}},
mounted:function(){if(this.value){this.____init=true;this.v=this.value;}}
});


Vue.component('new_params_bool_', {  
            template: `
            <div style="
align-items: center;
height: 48px;
line-height: 48px;
display: flex;
">

<el-tooltip class="item" effect="dark" :content="load_base_info.备注" placement="top">
<span class="new_params_base_from_span">
{{load_key}}</span>

</el-tooltip>


<el-select class="new_params_base_from_float_right" v-model="v" placeholder="请选择">
<el-option :key="false" label="false" :value="false"> </el-option>
<el-option :key="true" label="true" :value="true">  </el-option>
</el-select>
</div>
        `, 
        props:{value:null,load_params:null,load_base_info:null,load_key:null},
        data(){return {v:false,true:true,false:false}},
        methods:{
        update:function(e){
            this.$emit('input', e);
            
    let data_type="postput";//修改类型 postput是修改 delete是删除 clear是清空
    let data_value=e;//修改/新增/删除/清空的数据
    objs={
        'type':"change_data",
        "path":this.load_params.edit_path_before+(this.load_params.path?"."+this.load_params.path:""),
        "data_type":data_type,
        "data":data_value,
        other_callback:[
            {
              'key':'change_params',
              data:{
                'type':"change_data",
                'path':this.load_params.path,//当前组件 修改的数据的路径
                'idx':this.load_params.idx,//web窗口的dom的idx
                'page':this.load_params.page,//web窗口当前正在操作的页面
                "data_type":data_type,//修改类型 postput是修改 delete是删除 clear是清空
                "data":data_value,
            }
            }]
    }
    try{lhp_run_func(this.load_params.update,objs);}
    catch{}
}
        },
        watch:{'v':function(e){try{if(this.____init){this.____init=false;return}}catch{}this.update(e);}},
        mounted:function(){if(this.value){this.____init=true;this.v=this.value;}}});
Vue.component('new_params_minmax_', {  
            template: `

            <div style="
align-items: center;
height: 48px;
line-height: 48px;
display: flex;
">

<el-tooltip class="item" effect="dark" :content="load_base_info.备注" placement="top">
<span class="new_params_base_from_span">
{{load_key}}</span>

</el-tooltip>

<div class="el-select new_params_base_from_float_right"style="
margin-left: auto;">

 
<el-select style="width:30%"class="new_params_base_minmax_left" v-model="now_select" placeholder="请选择">
<el-option  key="null_" :label="null_" :value="null_"></el-option>
<el-option  key="num" label="num" :value="number"></el-option>

</el-select>
<input style="width:30%"ref="min"v-show="now_select==number"key="min" class="new_params_base_minmax__0_right"  v-model="min"> </input>

<input style="width:30%"ref="max"v-show="now_select==number" key="max" class="new_params_base_minmax__0_right" v-model="max">  </input>

</div>
</div>
        `, 
        props:{value:null,load_params:null,load_base_info:null,load_key:null},
        data(){return {min:'0',max:'10',null_:"null",number:'number',now_select:'',true:true,false:false}},
        methods:{
            set_min:function(v){this.min=v+''},
            set_max:function(v){this.max=v+''},
        update:function(e){
            this.$emit('input',e);
            let data_type="postput";//修改类型 postput是修改 delete是删除 clear是清空
            let data_value=e;//修改/新增/删除/清空的数据
            objs={
                'type':"change_data",
                "path":this.load_params.edit_path_before+(this.load_params.path?"."+this.load_params.path:""),
                "data_type":data_type,
                "data":data_value,
                other_callback:[
                    {
                      'key':'change_params',
                      data:{
                        'type':"change_data",
                        'path':this.load_params.path,//当前组件 修改的数据的路径
                        'idx':this.load_params.idx,//web窗口的dom的idx
                        'page':this.load_params.page,//web窗口当前正在操作的页面
                        "data_type":data_type,//修改类型 postput是修改 delete是删除 clear是清空
                        "data":data_value,
                    }
                    }]
            }
            try{lhp_run_func(this.load_params.update,objs);}
            catch{}
        }
        },
        watch:{'min':function(e){try{if(this.____init1){this.____init1=false;return}}catch{}this.update([parseFloat(this.min),parseFloat(this.max)]);},
        'max':function(e){try{if(this.____init2){this.____init2=false;return}}catch{}this.update([parseFloat(this.min),parseFloat(this.max)]);},
        'now_select':function(e){
            console.log("this.____now_select_flag",this.____now_select_flag)
            try{if(this.____now_select_flag){this.____now_select_flag=false;return}}catch{}
            if(e=='null'){this.update(null)}
            else if(e=='number'){
                this.update([parseFloat(this.min),parseFloat(this.max)]);
            }
        },
    },
        mounted:function(){

            this.____now_select_flag=true;
            this.____init1=true;this.____init2=true;
            if (this.value==null){this.now_select='null';this.min='0';this.max='10';}
            else{this.now_select='number';ttime3(this,'min',this.set_min,[this.value[0]]);
            ttime3(this,'max',this.set_max,[this.value[1]]);
            }}});


Vue.component('new_params_select_', {  
    template: `

    <div style="
    align-items: center;
    height: 48px;
    line-height: 48px;
    display: flex;
    ">
    
    <el-tooltip class="item" effect="dark" :content="load_base_info.备注" placement="top">
    <span class="new_params_base_from_span">
    {{load_key}}</span>
    
    </el-tooltip>
    
    
<el-select class="new_params_base_from_float_right" v-model="v" placeholder="请选择">
<el-option  v-for="item in load_data" :key="item" :label="item" :value="item">
</el-option>
</el-select>
    </div>
`,
props:{value:null,load_params:null,load_base_info:null,load_key:null,load_data:null},
data(){return {v:''}},
methods:{
update:function(e){
    this.$emit('input',e);
    
    let data_type="postput";//修改类型 postput是修改 delete是删除 clear是清空
    let data_value=e;//修改/新增/删除/清空的数据
    objs={
        'type':"change_data",
        "path":this.load_params.edit_path_before+(this.load_params.path?"."+this.load_params.path:""),
        "data_type":data_type,
        "data":data_value,
        other_callback:[
            {
              'key':'change_params',
              data:{
                'type':"change_data",
                'path':this.load_params.path,//当前组件 修改的数据的路径
                'idx':this.load_params.idx,//web窗口的dom的idx
                'page':this.load_params.page,//web窗口当前正在操作的页面
                "data_type":data_type,//修改类型 postput是修改 delete是删除 clear是清空
                "data":data_value,
            }
            }]
    }
    try{lhp_run_func(this.load_params.update,objs);}
    catch{}}
},
watch:{'v':function(e){try{if(this.____init){this.____init=false;return}}catch{}this.update(e);}},
mounted:function(){if(this.value){this.____init=true;this.v=this.value;}}});
//@bind_func='xxx' @path_before
// 初始状态为隐藏的一个 弹窗 表单 vue组件
Vue.component2('new_params_base_from', {  
    template: `
<div class="new_params_base_from_div">

    <el-form class="new_params_base_from_height400":key="data.ttest"v-if="data.now_data!=null" style='height:100%;margin-left:5px;    overflow-x: hidden;overflow-y: scroll;' :class="{'new_params_base_from_height400':!title_hid}">
    <div class="new_params_base_from_div2" style="height:48px">
        <!-- 全局名称-->
        <new_params_text_ 
        load_key="全局名称"
        :load_base_info="load_from_data.全局名称"
        :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+'var_name',
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}"
                 
        v-model="data.now_data['全局名称']">
        </new_params_text_>
    </div>
    <!-- 基础属性 -->
        <el-collapse  background-color="rgb(84, 92, 100)"text-color="rgb(255, 255, 255)"
                     accordion >
            <el-collapse-item title="基础属性" name="fdkasdnnclznl_基础属性" >
                
                <div  class="new_params_base_from_div2"  style="height:48px">
                    <!-- width宽度 -->
                    <new_params_text_ 
                    load_key="width"
                    :load_base_info="load_from_data.width"
                    :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+'width',
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}"
                    v-model="data.now_data['width']">
                    </new_params_text_>
                </div>
                
                <div  class="new_params_base_from_div2"  style="height:48px">
                    <!-- height高度 -->
                    <new_params_text_ 
                    load_key="height"
                    :load_base_info="load_from_data.height"
                    :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+'height',
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}"
                    v-model="data.now_data['height']">
                    </new_params_text_>
                </div>
                
                <div  class="new_params_base_from_div2"  style="height:48px">
                    <!-- padding_left -->
                    <new_params_text_ 
                    load_key="padding_left"
                    :load_base_info="load_from_data.padding_left"
                    :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+'padding_left',
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}"
                    v-model="data.now_data['padding_left']">
                    </new_params_text_>
                </div>
                
                <div  class="new_params_base_from_div2"  style="height:48px">
                    <!-- padding_right -->
                    <new_params_text_ 
                    load_key="padding_right"
                    :load_base_info="load_from_data.padding_right"
                    :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+'padding_right',
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}"
                    v-model="data.now_data['padding_right']">
                    </new_params_text_>
                </div>
                
                <div  class="new_params_base_from_div2"  style="height:48px">
                    <!-- padding_top -->
                    <new_params_text_ 
                    load_key="padding_top"
                    :load_base_info="load_from_data.padding_top"
                    :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+'padding_top',
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}"
                    v-model="data.now_data['padding_top']">
                    </new_params_text_>
                </div>
                
                <div  class="new_params_base_from_div2"  style="height:48px">
                    <!-- padding_bottom -->
                    <new_params_text_ 
                    load_key="padding_bottom"
                    :load_base_info="load_from_data.padding_bottom"
                    :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+'padding_bottom',
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}"
                    v-model="data.now_data['padding_bottom']">
                    </new_params_text_>
                </div>
                
                <div  class="new_params_base_from_div2"  style="height:48px">
                    <!-- margin_left -->
                    <new_params_text_ 
                    load_key="margin_left"
                    :load_base_info="load_from_data.margin_left"
                    :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+'margin_left',
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}"
                    v-model="data.now_data['margin_left']">
                    </new_params_text_>
                </div>
                
                <div  class="new_params_base_from_div2"  style="height:48px">
                    <!-- margin_right -->
                    <new_params_text_ 
                    load_key="margin_right"
                    :load_base_info="load_from_data.margin_right"
                    :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+'margin_right',
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}"
                    v-model="data.now_data['margin_right']">
                    </new_params_text_>
                </div>
                
                <div  class="new_params_base_from_div2"  style="height:48px">
                    <!-- margin_top -->
                    <new_params_text_ 
                    load_key="margin_top"
                    :load_base_info="load_from_data.margin_top"
                    :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+'margin_top',
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}"
                    v-model="data.now_data['margin_top']">
                    </new_params_text_>
                </div>
                
                <div  class="new_params_base_from_div2"  style="height:48px">
                    <!-- margin_bottom -->
                    <new_params_text_ 
                    load_key="margin_bottom"
                    :load_base_info="load_from_data.margin_bottom"
                    :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+'margin_bottom',
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}"
                    
                    v-model="data.now_data['margin_bottom']">
                    </new_params_text_>
                </div>
            </el-collapse-item>
        </el-collapse>
        <!-- 组件交互 -->
        <el-collapse  background-color="rgb(84, 92, 100)"text-color="rgb(255, 255, 255)"
                     accordion v-if="check_2x()">
            <el-collapse-item title="组件交互" name="fdkasdnnclznl_组件交互">
                <div v-for="(valuee, key) in load_from_data" class="new_params_base_from_div2" v-if="check_zujianjiaohu(valuee.type)" style="height:48px">
                    <!-- 命名函数(文本输入) -->
                    <new_params_f_ v-if="valuee.type=='f'"
                    :load_key="key"
                    :load_base_info="valuee"
                    :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+key,
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}" v-model="data.now_data[key]">
                    </new_params_f_>
                    <!-- 接收函数(文本输入) -->
                    <new_params_r_ v-if="valuee.type=='r'"
                    :load_key="key"
                    :load_base_info="valuee"
                    :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+key,
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}" v-model="data.now_data[key]">
                    </new_params_r_>
                    
                    <!-- 语言设置(文本输入) -->
                    <new_params_l_ v-if="valuee.type=='l'"
                    :load_key="key"
                    :load_base_info="valuee"
                    :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+key,
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}" v-model="data.now_data[key]">
                    </new_params_l_>

                    
                    <!-- 路由设置(文本输入) -->
                    <new_params_u_ v-if="valuee.type=='u'"
                    :load_key="key"
                    :load_base_info="valuee"
                    :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+key,
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}" v-model="data.now_data[key]">
                    </new_params_u_>

                    
                    <!-- 命名数据(文本输入) -->
                    <new_params_u_ v-if="valuee.type=='v'"
                    :load_key="key"
                    :load_base_info="valuee"
                    :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+key,
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}" v-model="data.now_data[key]">
                    </new_params_u_>
                </div>
            </el-collapse-item>
        </el-collapse>
        <div v-for="(valuee, key) in load_from_data" class="new_params_base_from_div2"v-if="check_2(valuee.type)"style="height:48px">
            <!-- 文本输入 -->
            <new_params_text_ v-if="valuee.type=='text'"
            :load_key="key"
            :load_base_info="valuee"
            :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+key,
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}" v-model="data.now_data[key]">
            </new_params_text_>

            
            <!-- 布尔 bool 输入 -->
            <new_params_bool_ v-if="valuee.type=='bool'"
            :load_key="key"
            :load_base_info="valuee"
            :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+key,
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}" v-model="data.now_data[key]">
            </new_params_bool_>

            <!-- select 输入 -->
            <new_params_select_ v-if="valuee.type=='select'"
            :load_key="key"
            :load_base_info="valuee"
            :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+key,
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}" v-model="data.now_data[key]">
            </new_params_select_>

            <!-- minmax 输入 -->
            <new_params_minmax_ v-if="valuee.type=='minmax'"
            :load_key="key"
            :load_base_info="valuee"
            :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+key,
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}"
             v-model="data.now_data[key]">
            </new_params_minmax_>



        <!-- 选择 listdct 输入 -->
        
    <div v-if="valuee.type=='listdct'"style="align-items: center;height: 48px;line-height: 48px;display: flex;">
        <el-tooltip class="item" effect="dark" :content="valuee.备注" placement="top">
            <span class="new_params_base_from_span">{{key}}</span>
        </el-tooltip>
    </div>
        <div v-if="valuee.type=='listdct'" class="new_params_base_from_listdct"style="width:100%;">
        
            <el-button style="position: sticky;
            background-color: transparent;
            color: white;
            margin-bottom: 3px;" class="new_params_add_button"size="small" @click="listdct_____add(key)">添加数据</el-button>
            <div class="new_params_base_from_listdct_div" style="    border: 1px solid #EBEEF5;">
                <el-collapse  background-color="rgb(84, 92, 100)"text-color="rgb(255, 255, 255)"
                    v-for="item,indexr in data.now_data[key]" :key="indexr"  accordion>
                    <el-collapse-item :title="'数据'+indexr" :name="indexr" class="new_params_listdct_div">
                        <newParamsBaseFrom modal="true" :load_data="item" :key="indexr" v-model="data.now_data[key][indexr]"  :title_hid="data.true":show_flag="data.true" :button_hid="true" :load_from_data="load_from_data[key].listdct"
        :load_params="{
        'edit_path_before':load_params.edit_path_before,
        'path':(load_params.path?'.'+load_params.path:'')+indexr,
        update:load_params.update,
        'idx':load_params.idx,
        'page':load_params.page,}" > 
                
                        </newParamsBaseFrom>
                        <el-button style="position: sticky;bottom: 0;  "type="primary" @click="listdct_____del(key,indexr)">删除数据</el-button>
                    </el-collapse-item>
                    
                </el-collapse>
            </div>
        </div>




        </div>
    </el-form>


</div>
`,  
  props:{
    value: {  
      type: Object,  
      // 使用工厂函数来返回一个新的空对象作为默认值  
      default: function () {  
        return {};  
      }  
    },
    load_params:null,edit_path_before:null,var_name:null,load_url:null,load_from_data:null,load_data:null,test:null,bind_from_params:null,title_hid:null,button_hid:null,title_name:null,modal:null,title_type:null,title_var_name:null,config_data:null,is_edit:null,show_flag:null,db_name:null,db_url:null},
  data() {  

    return {  
            false:false,
        data:{
            ttest:'e1',
            false:false,
            true:true,
            is_edit:false,
            res:{},
            title_data:'',
            minmaxt:[0,1],
            minmax:{},
            listdct:{},
            null:null,
            false:false,
            true:true,
            config_data:{},
            title:'表单',                //表单标题
            from:{},                    //表单数据存放对象
            show_flag:false,            //表单是否显示
            first_show:true,            //是否是第一次显示
            now_data:null,
            data:{        
                },
            
        }
        ,
    }    

}, 
    methods: {  
        check_zujianjiaohu:function(v){
            return ['f','r','l','u','v'].some(str => str === v)
        },
        check_2:function(v){
            
            return ['text','select','minmax','bool','listdct'].some(str => str === v)
        },
        check_2x:function(){
            let temp=['f','r','l','u','v'];
            for(let key in this.load_from_data){
                if (temp.some(str => str === this.load_from_data[key].type)){
                    return true
                }
            }
            return false
        },
        listdct_____add:function(key){
            //params_val 参数的定义 如格式 默认值
            let params_val=this.load_from_data[key].listdct;
            //根据格式创建一个新的数据对象
            let new_obj={};
            for (let kkk in params_val){
                new_obj[kkk]=params_val[kkk].default;
            }
            //设置新的回调函数  old_obj._this.data.data[old_obj.key].def
            this.data.now_data[key].push(new_obj);
            try{
                let update_val={path:this.load_params.edit_path_before+(this.load_params.path?"."+this.load_params.path:"")+'.'+key+'.'+( this.data.now_data[key].length-1),data:new_obj,data_type:"postput",type:"change_data"};
                this.load_params.update(update_val)}catch{}
            },
            listdct_____del:function(key,indexr){
                this.data.now_data[key].splice(indexr,1);
                try{
                    let update_val={path:this.load_params.edit_path_before+(this.load_params.path?"."+this.load_params.path:"")+'.'+key+'.'+indexr,data_type:"delete",type:"change_data"};
                    this.load_params.update(update_val)}catch{}
            },
        to_json:function(strr){
            return JSON.parse(strr)
        },
        to_jsonstr:function(strr){
            return JSON.stringify(strr)
        },
        ok:function(){
            this.load_params.ok_callback(this.data.now_data)
            this.data.show_flag=false;//关闭弹窗
        },
    },  
    watch:{//监听输入框的变化
        'data.show_flag':function(show_flag){
            if (this.data.first_show==true){
                //解决有时候显示
                this.data.first_show=false;
                if (this.data.temp_set_val_data!=null){
                    //尝试50次  每次50毫秒，根据check_refs_empty
                    ttime2(this.check_refs_empty,this.temp_set_val)
                }
            }
            if (show_flag==true){
                //重新加载
                setTimeout(this.init_val,1000)
            }
        },
        
        
        //   'data.data.res': {  
        //     handler(newval) {  
        //       if (!this.modal){this.$emit('bind_from',this.data.res.info)}
        //     },
        //       deep: true, // 深度监听对象属性  
        //     },
        'data.title_data':function(val){
            
          this.data.res[this.data.title_var_name]=this.data.title_data
          this.data.res['info']=this.data.from
        }
    },
    mounted: function () {  
        //初始化 变量名
        if (this.title_var_name){
            this.data.title_var_name=this.title_var_name
          }else{this.data.title_var_name='title'}
        //初始化标题的值
          if (this.title_name!=null){
            this.data.title_name=this.title_name
          }else{this.data.title_name='添加'}
        //初始化标题类型
          if (this.title_type){
            this.data.title_type=this.title_type
          }else{
            this.data.title_type=null
          }
        //初始化 字符
        if (_this.config_data==null){
            _this.data.config_data={
                确定:'确定',
                输入数据格式异常:'输入数据格式异常',
                '取 消':'取 消',
                '取消':'取消',
                '确 定':'确 定',
                '表单':'表单',
            }
        }else{
            _this.data.config_data=_this.config_data
        }
        //初始化表单显示状态
        if (_this.show_flag){
            _this.data.show_flag=_this.show_flag
        }
        //清空内容 //初始化
        _this.data.clear_from=function(){
            // try{this.data.data=this.data.old_data;}catch{}
            let new_data={};
            for (let key in _this.load_from_data){
                new_data[key]=JSON.parse(JSON.stringify(_this.load_from_data[key].default));
            }
            _this.data.now_data=new_data;
            _this.data.ttest=_this.data.ttest.length>7?'__ss_':_this.data.ttest+'1';
        };  
        //写入数据到表单中
        _this.data.write_from=function(data){
            let new_data1={};
            for (let key in _this.load_from_data){
                new_data1[key]=JSON.parse(JSON.stringify(_this.load_from_data[key].default));
            }
            let new_data=JSON.parse(JSON.stringify(data));
            lhp_deepcopy1(new_data1,new_data);
            _this.data.now_data=new_data1;
            _this.data.ttest=_this.data.ttest.length>7?'__ss_':_this.data.ttest+'1';
            };  
        _this.data.ok_func=function (){}
        _this.data.$refs=function(){return _this.$refs};
        _this.data.return_obj=function(index){
            try{return _this.$refs['lhp_from1'+index][0].data}
            catch{return _this.$refs['lhp_from1'+index].data}
        }
        _this.data.this=function(){return _this}
        _this.data.set_val=function(data){
            _this.data.temp_set_val_data=data;
            for (let key in data){
                try{
                _this.data.return_obj(key).set_val(data[key])}catch{}
            }
        }
        _this.data.get_val=function(){
            return _this.data.from
        }
        _this.data.clear_val=function(data){
            for (let key in data){
                try{_this.data.return_obj(key).clear_val()}catch{}
            }
        }        
        _this.data.set_data=function(new_data,data2={}){
            _this.data.listdct={}
            _this.data.minmax={}
            for (let key in new_data){
                if (new_data[key].type=='minmax'){
                    _this.data.minmax[key]=[0,8]
                }
                // _this.data.from[key]=this.load_data[key].default
            }
            
            for (let key in data2){
                try{new_data[key].default=data2[key]}catch{}
            }

            _this.data.data=new_data;
        }
        let default_load_params={
            edit_path_before:'',
            path:'',
            update:null
        }
        if (this.load_params){
            console.log("设置组件属性",4,this.load_params);
            let new_load_params2=JSON.parse(JSON.stringify(this.load_params));
            try{
                for(let key in default_load_params){
                    if (!new_load_params2[key]){new_load_params2[key]=default_load_params[key]}
                }
                this.data.load_params=new_load_params2;}
                catch(err){console.log("设置组件属性 4 error",err)}
            console.log("设置组件属性",5,new_load_params2);
        }else{
            let new_load_params=JSON.parse(JSON.stringify(default_load_params));
            let new_load_params2={};
            lhp_deepcopy1(new_load_params2,new_load_params);
            this.data.load_params=new_load_params2;
        }
        //根据初始化值 初始化数据
            if (_this.load_from_data){
                let new_from_data={};
                for (let key in _this.load_from_data){
                    new_from_data[key]=_this.load_from_data[key].default;
                }
                let new_from_data2=JSON.parse(JSON.stringify(new_from_data))
                lhp_deepcopy1(new_from_data2,_this.value);
                lhp_deepcopy1(_this.value,new_from_data2);
                _this.data.now_data=new_from_data2;
                console.log("设置组件属性 6",_this.data.now_data)
                // _this.$emit("input",new_from_data);
            }

            if(this.test){
                console.log('load_from_data:',this.load_from_data)
            }
            window.test_c=_this
    }  
} 
);
